package com.badlogic.androidgames.game;

import android.graphics.Color;

import com.badlogic.androidgames.framework.Game;
import com.badlogic.androidgames.framework.Graphics;
import com.badlogic.androidgames.framework.Screen;

public class Level04 extends Screen {

	public Wall[] walls;
	public Escada[] escadas;
	public Laser[] lasers;
	Player player;
	
	public Level04(Game game) {
		super(game);
		 Load();
	}
	
	public void Load()
	{
		walls = new Wall[]
		{		
			//new Wall(Assets.Wall,new Vector2(0,320 - 30),new Vector2(480,30)),			
			new Wall(Assets.WallQuadriculada,new Vector2(0,213 - 80),new Vector2(190,200)),
			new Wall(Assets.WallQuadriculada,new Vector2(480 - 190,213 - 80),new Vector2(190,200)),			
			new Wall(Assets.Wall,new Vector2(0,50),new Vector2(480,10)),		
		};
		
		escadas = new Escada[]
		{
			//new Escada(Assets.Escada, new Vector2(240 - 50,130), new Vector2(100,190)),	
		};
		
		lasers = new Laser[]
		{
			//new Laser(Assets.Laser, new Vector2(60,210 - 80 - 60),new Vector2(10,60)),
			//new Laser(Assets.Laser, new Vector2(120,210 - 80 - 60),new Vector2(10,60)),
			//new Laser(Assets.Laser, new Vector2(140,210 - 80 - 60),new Vector2(10,60)),
			
			//new Laser(Assets.Laser, new Vector2(480 - 70,210 - 80 - 60),new Vector2(10,60)),
			//new Laser(Assets.Laser, new Vector2(480 - 130,210 - 80 - 60),new Vector2(10,60)),
			//new Laser(Assets.Laser, new Vector2(480 - 150,210 - 80 - 60),new Vector2(10,60)),
			
		};
		
		
		player = new Player(Assets.PlayerWalkD, new Vector2(300, 200), new Vector2(35, 35), new Vector2(19, 22));
	}

	@Override
	public void update(float deltaTime) {
		
		if(lasers != null)
		{
			for(int i = 0; i < lasers.length; i++)
			{
				//lasers[i].Update(deltaTime, player);
			}
		}
		
	}

	@Override
	public void present(float deltaTime) {
		
		Graphics g = game.getGraphics();
		
		
		
		if(walls != null)
		{
			for(int i = 0; i < walls.length; i++)
			{
				walls[i].Draw(g,Color.RED);
			}
		}
		if(escadas != null)
		{
			for(int i = 0; i < escadas.length; i++)
			{
				escadas[i].Draw(g);
			}
		}
		if(lasers != null)
		{
			for(int i = 0; i < lasers.length; i++)
			{				
				lasers[i].Draw(g);
			}
		}
		
	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub
		
	}

}
